
This folder provides a set of MATLAB programs used to create
a digital audio filtering interactive environment (DAFIE)
mentioned in the text. 

M. Mandal and A. Asif, Continuous-time and Discrete-time 
Signals and Systems, Cambridge University Press, 2007. 

For detailed instructions on how to execute these programs, 
please refer to Section F.1 (in Appendix F). The following
four functions are primarily used to create the interactive
environment.

dafie.m		% main program for generating DAFIE
localbutton.m	% Function that selects the operation using local buttons
openfile.m	% Opens a dialog box to select an input audio file
designfilter.m	% Designs filters based on the specs provided by the user


The folder also includes two sound files - "testaudio3.wav" 
and "test44k.wav" which can be used during the simulation.

This environment has been tested with MATALB version 7.0.4 in
Windows XP environment.


Filter Specification:

The filter design specification includes 5 input parameters:

1. Filter Type: lowpass/highpass/bandpass/bandstop
2. Design Type: Bartlett/Hamming/Hanning/Blackmann/Kaiser/..
                Butterworth/Chebyshev-2
3. No. of Filter Taps: This is meaningful only for FIR filters
4. Cut-off frequency (in Hz): For lowpass and highpass, it is 
   the only cut-off frequency. For bandpass/bandstop filters,
   this is the lower cut-off frequency.
5. Second Cut-off frequency (in Hz): This is the upper cut-off 
   frequency for the bandpass/bandstop filters. This is not 
   meaningful for lowpass and highpass filters.

Filter Design:

The FIR filters are designed using the "fir1" MATLAB function 
whereas the IIR filters are designed using "butter" or "cheby2" 
functions. See chapters 15 and 16 for more details on the
use of these functions.

When the cut-off frequencies are specified in Hz, it is necessary
to know the sampling frequency of the signal. The DAFIE uses
the sampling frequency stored in the header of the WAV file.

MATLAB workspace:
While running the DAFIE, check the MATLAB workspace while pressing
the the buttons in the "Commands Window". Important parameters
calculated on the fly are displayed in the workspace.